package model;

import java.awt.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;

import javax.swing.*;
import javax.swing.border.Border;

public class Exemples extends JFrame{
	
		public Exemples() {
			
		}
	
		public static void main(String args[]) {
			try{
				   Pattern p = Pattern .compile("a*b|c");
				   String entree = "aabbbcab";
				   Matcher m = p.matcher(entree);
				   while (m.find())
				      System.out.println(entree.substring(m.start(), m.end()));
				}catch(PatternSyntaxException pse){
				}
				
				String s="Ville d'Europe";
				String s1=s.replaceAll("[\\s']", "_");
				s1=s1.toLowerCase();
				System.out.println(s1);
				//http://prevert.upmf-grenoble.fr/Prog/Java/CoursJava/expressionsRegulieres.html
		
		}

}
